import 'package:card_swiper/card_swiper.dart';
import 'package:flutter/material.dart';

class HeadSwiper extends StatelessWidget {
  const HeadSwiper({super.key});

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: MediaQuery.of(context).size.width,
      height: 200,
      child: Swiper(
        itemBuilder: (BuildContext context, int index) {
          return Image(
            image: AssetImage('assets/img/swiper/${index + 1}.jpg'),
            fit: BoxFit.cover,
          );
        },
        viewportFraction: 0.8,
        scale: 0.9,
        itemCount: 3,
        pagination: const SwiperPagination(),
        autoplay: true,
      ),
    );
  }
}
